<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="PatientvisitEditDlg" widgetVar="PatientvisitEditDialog" modal="true" resizable="false" appendToBody="true" header="#{myBundle.EditPatientvisitTitle}">

            <h:form id="PatientvisitEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{patientvisitController.selected != null}">

                        <h:outputLabel value="#{myBundle.EditPatientvisitLabel_patientvisitPK_vid}" for="patientvisitPK_vid" />
                        <h:outputText id="patientvisitPK_vid" value="#{patientvisitController.selected.patientvisitPK.vid}" />

                        <h:outputLabel value="#{myBundle.EditPatientvisitLabel_patientvisitPK_pid}" for="patientvisitPK_pid" />
                        <h:outputText id="patientvisitPK_pid" value="#{patientvisitController.selected.patientvisitPK.pid}" />

                        <p:outputLabel value="#{myBundle.EditPatientvisitLabel_visitDateTime}" for="visitDateTime" />
                        <p:calendar id="visitDateTime" pattern="MM/dd/yyyy HH:mm:ss" value="#{patientvisitController.selected.visitDateTime}" title="#{myBundle.EditPatientvisitTitle_visitDateTime}" required="true" requiredMessage="#{myBundle.EditPatientvisitRequiredMessage_visitDateTime}" showOn="button"/>

                        <p:outputLabel value="#{myBundle.EditPatientvisitLabel_bloodPressureUpper}" for="bloodPressureUpper" />
                        <p:inputText id="bloodPressureUpper" value="#{patientvisitController.selected.bloodPressureUpper}" title="#{myBundle.EditPatientvisitTitle_bloodPressureUpper}" required="true" requiredMessage="#{myBundle.EditPatientvisitRequiredMessage_bloodPressureUpper}"/>

                        <p:outputLabel value="#{myBundle.EditPatientvisitLabel_bloodPressureLower}" for="bloodPressureLower" />
                        <p:inputText id="bloodPressureLower" value="#{patientvisitController.selected.bloodPressureLower}" title="#{myBundle.EditPatientvisitTitle_bloodPressureLower}" required="true" requiredMessage="#{myBundle.EditPatientvisitRequiredMessage_bloodPressureLower}"/>

                        <p:outputLabel value="#{myBundle.EditPatientvisitLabel_temperature}" for="temperature" />
                        <p:inputText id="temperature" value="#{patientvisitController.selected.temperature}" title="#{myBundle.EditPatientvisitTitle_temperature}" required="true" requiredMessage="#{myBundle.EditPatientvisitRequiredMessage_temperature}"/>

                        <p:outputLabel value="#{myBundle.EditPatientvisitLabel_respiratoryRate}" for="respiratoryRate" />
                        <p:inputText id="respiratoryRate" value="#{patientvisitController.selected.respiratoryRate}" title="#{myBundle.EditPatientvisitTitle_respiratoryRate}" required="true" requiredMessage="#{myBundle.EditPatientvisitRequiredMessage_respiratoryRate}"/>

                        <p:outputLabel value="#{myBundle.EditPatientvisitLabel_pulse}" for="pulse" />
                        <p:inputText id="pulse" value="#{patientvisitController.selected.pulse}" title="#{myBundle.EditPatientvisitTitle_pulse}" required="true" requiredMessage="#{myBundle.EditPatientvisitRequiredMessage_pulse}"/>

                        <p:outputLabel value="#{myBundle.EditPatientvisitLabel_hid}" for="hid" />
                        <p:selectOneMenu id="hid" value="#{patientvisitController.selected.hid}" required="true" requiredMessage="#{myBundle.EditPatientvisitRequiredMessage_hid}">
                            <f:selectItem itemLabel="#{myBundle.SelectOneMessage}"/>
                            <f:selectItems value="#{hospitalController.items}"
                                           var="hidItem"
                                           itemValue="#{hidItem}"
                                           itemLabel="#{hidItem.name.toString()}"
                                           />
                            <f:converter binding="#{hospitalConverter}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{patientvisitController.save}" value="#{myBundle.Save}" update="display,:PatientvisitListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,PatientvisitEditDialog);"/>
                    <p:commandButton value="#{myBundle.Cancel}" onclick="PatientvisitEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
